package com.wonders.frame.autoGeneration.controller;

import com.gcr.server.response.Response;
import com.wonders.frame.autoGeneration.service.AutoGenerationService;
import com.wonders.frame.autoGeneration.support.from.GenForm;
import com.wonders.frame.controller.core.AbstractController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/autoGen")
public class AutoGenerationController extends AbstractController {
    @Autowired
    private AutoGenerationService service;
    @PostMapping("/start")
    public Response start(@RequestBody GenForm form){
        service.autoGeneration(form);
        return successResponse(1);
    }
}
